import { communityListApi } from '../api/community.js'
// 获取小区
export const useCommunityList = () => {
    const communityList = ref([])
    // 全部获取小区
    const getAllCommunityList = async () => {
        const res = await communityListApi()
        console.log(res);
        communityList.value = res.data

    }
    onMounted(() => {
        getAllCommunityList()
    })
   
    return communityList
}

// 广告位置
export const useAdvStatus = () => {
    const advStatus = [
        {
            label: '移动端轮播图', value: 1
        },
        {
            label: 'PC端轮播图', value: 2
        }
    ]
    return advStatus
}

// !获取角色状态  广告状态通知公告状态用这个
export const useRoleStatus = () => {
    const roleStatus = [
        {
            label: '启用', value: 1
        },
        {
            label: '禁用', value: 0
        }
    ]
    return roleStatus
}